#!/bin/bash
echo "-----------------run build...-----------------"
npm run build

echo "-----------------goto ipackage-be...-----------------"
cd ../ipackage-be

echo "-----------------git add...-----------------"
git add .

printf "do you want to commit 'update fe'? [y/n] "
read answer
if [ $answer == 'y' ]
then 
  commitMsg='update fe'
elif [ $answer == 'n' ]
then
  printf 'please enter commit massage: '
  read commitMsg
else
  exit 0
fi
echo "-----------------git commit...-----------------"
git commit -am "'$commitMsg'"

echo "-----------------git push...-----------------"
git push

echo "-----------------login...-----------------"
ssh root@josh-mmc.club
